<?php

use common\helpers\Url;
use yii\widgets\ActiveForm;
use common\enums\StatusEnum;
$this->title = '基本信息';
$this->params['breadcrumbs'][] = ['label' => $this->title];

?>

<div class="row">
    <div class="col-sm-12">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="<?= Url::to(['edit', 'id' => $workflow_id]) ?>">基本信息</a></li>
                <li><a href="<?= Url::to(['status/index', 'workflow_id' => $workflow_id]) ?>">流程状态</a></li>
                <li><a href="<?= Url::to(['transition/index', 'workflow_id' => $workflow_id]) ?>">工作流转</a></li>
            </ul>
            <div class="tab-content">
                <div class="active tab-pane">
                    <?php $form = ActiveForm::begin([
                        'fieldConfig' => [
                            'template' => "<div class='col-sm-2 text-right'>{label}</div><div class='col-sm-10'>{input}{hint}{error}</div>",
                        ]
                    ]); ?>
                    <div class="box-body">
                        <?= $form->field($model, 'title')->textInput(['placeholder'=>'请输入中文名称']); ?>
                        <?= $form->field($model, 'id')->textInput(['placeholder'=>'请输入英文单词']); ?>
                        <?= $form->field($model, 'initial_status_id')->textInput(['value'=>'apply','placeholder'=>'请输入：apply']); ?>
                    </div>
                    <div class="box-footer text-center">
                        <button class="btn btn-primary" type="submit">保存</button>
                        <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                    </div>
                    <?php ActiveForm::end(); ?>
                </div>
            </div>
        </div>
    </div>
</div>